﻿Public Class Cad_Func
    Inherits System.Web.UI.Page

    Protected func_uc_collection As ArrayList

    Protected Sub save_Func(ByVal sender As Object, ByVal e As System.EventArgs) Handles b_saveF.Click


    End Sub

    Public Sub New()

        Me.func_uc_collection = New ArrayList

    End Sub

    Private Sub add_funcField(ByVal qty As Integer)

        Dim tr_func As TableRow, td_func As TableCell, uc_func As FUNC_UC, fieldsTitles As New List(Of String)

        fieldsTitles.Add("Nome")
        fieldsTitles.Add("Equipe")
        fieldsTitles.Add("Status")
        fieldsTitles.Add("Admissao")

        For counter As Integer = 0 To qty
            tr_func = New TableRow
            td_func = New TableCell
            uc_func = Me.LoadControl("~/Forms/FUNC_UC.ascx")

            uc_func.ID = qty

            td_func.Controls.Add(uc_func)
            tr_func.Cells.Add(td_func)
            Me.tb_func.Rows.Add(tr_func)

            Me.func_uc_collection.Add(uc_func)
        Next

    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Call add_funcField(8)

    End Sub

End Class